package com.geeksaga.captcha;

import com.octo.captcha.service.captchastore.FastHashMapCaptchaStore;
import com.octo.captcha.service.image.DefaultManageableImageCaptchaService;
import com.octo.captcha.service.image.ImageCaptchaService;

public class CaptchaUtil {
    private static ImageCaptchaService instance = initializeService();

    private static ImageCaptchaService initializeService() {
        com.octo.captcha.engine.image.gimpy.SimpleListImageCaptchaEngine engine = new com.octo.captcha.engine.image.gimpy.SimpleListImageCaptchaEngine();
        return new DefaultManageableImageCaptchaService(new FastHashMapCaptchaStore(), engine, 180, 100000, 75000);
    }

    public static ImageCaptchaService getInstance() {
        return instance;
    }
}